package com.vin.rabbitmq.examples;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * <br>
 *
 * @author levin
 * @version 1.0.0
 */
@Slf4j
@SpringBootApplication
public class RabbitmqApplication {

    public static void main(String[] args) {
        SpringApplication.run(RabbitmqApplication.class);
    }

    @Bean
    public ApplicationRunner get(RabbitTemplate rabbitTemplate) {
        return args -> {
            log.info("rabbit template init...{}", rabbitTemplate.getClass());
        };
    }
}
